<?php ?>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--><html lang="en"> <!--<![endif]-->

    <!-- BEGIN HEAD -->
    <head>

        <?php $this->renderPartial('//layouts/includes/head'); ?>
    </head>


    <body>

        <header class="blue"> <!-- Header start -->
            <a href="#" class="logo_image"><span class="hidden-480">FlatPoint</span></a>
            <ul class="header_actions pull-left hidden-480 hidden-768">
                <li rel="tooltip" data-placement="bottom" title="Ocultar/Mostrar menu Navegacion" ><a href="#" class="hide_navigation"><i class="icon-chevron-left"></i></a></li>
                   
                </li>
            </ul>
            <ul class="header_actions">
              
                <li class="dropdown"><a href="#"><img src="demo/avatar_06.png" alt="User image" class="avatar"> Bernad Delic <i class="icon-angle-down"></i></a>
                    <ul>
                        <?php if (!Yii::app()->user->isGuest): ?>
                            <li><?php echo CHtml::link('<i class="icon-user"></i>&nbsp;&nbsp;Mi Cuenta', array('/cruge/ui/editprofile')) ?></a></li>

                            <li><?php echo CHtml::link('<i class="icon-key"></i>&nbsp;&nbsp;Cerrar Sesión', Yii::app()->user->ui->logoutUrl) ?></a></li>
                        <?php else: ?>
                            <li><?php echo CHtml::link('<i class="icon-key"></i>&nbsp;&nbsp;Iniciar Sesión', Yii::app()->user->ui->loginUrl) ?></a></li>
                        <?php endif; ?>
                    </ul>
                </li>


            </ul>
        </header>

        <div id="main_navigation" class="blue"> <!-- Main navigation start -->
            <div class="inner_navigation">
                <?php
                $this->widget('zii.widgets.CMenu', array(
                    'items' => $this->admin ? Menu::getAdminMenu($this) : Menu::getMenu($this),
                    'encodeLabel' => false,
                    'itemCssClass' => 'sub-main', //esto es para la clase encerradad d los menus
                    'activeCssClass' => 'active',
                    'htmlOptions' => array('class' => 'main'),
                    'submenuHtmlOptions' => array('class' => 'sub_main')
                ));
                ?>
                <ul class="main">
                    <?php if (Yii::app()->user->checkAccess('admin')): ?>
                        <li><?php // echo CHtml::link('<i class="icon-cog"></i>&nbsp;&nbsp;Administración', Yii::app()->user->ui->userManagementAdminUrl)      ?></li>
                        <?php
                        $items = array(
                            array('label' => '<i class="icon-cog"></i>  Gestionamiento Cruge', 'url' => '#', 'items' => array(
                                    array('label' => '<i class="icon-user"></i>  Campos Personalizados', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Roles y Asignaciones', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Sistema', 'url' => '#'),
                                )),
                            array('label' => '<i class="icon-cog"></i>  Administrador de Usuarios', 'url' => '#', 'items' => array(
                                    array('label' => '<i class="icon-user"></i>  Administrador de Usuarios', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Campos Personalizados', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Roles y Asignaciones', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Sistema', 'url' => '#'),
                                )),
                            array('label' => '<i class="icon-cog"></i>  Campos PersonalizadosF', 'url' => '#', 'items' => array(
                                    array('label' => '<i class="icon-user"></i>  Administrador de Usuarios', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Campos Personalizados', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Roles y Asignaciones', 'url' => '#'),
                                    array('label' => '<i class="icon-user"></i>  Sistema', 'url' => '#'),
                                )),
                        );
                        $this->widget('zii.widgets.CMenu', array(
                            'items' => $items,
                            'encodeLabel' => false,
                            'itemCssClass' => 'sub-main', //esto es para la clase encerradad d los menus
                            'activeCssClass' => 'active',
                            'htmlOptions' => array('class' => 'main'),
                            'submenuHtmlOptions' => array('class' => 'sub_main')
                        ));
                        ?>
                    <?php endif; ?>
                </ul>
            </div>
        </div>  



        <div id="content" class="no-sidebar"> <!-- Content start -->
            <div class="top_bar">
                <ul class="breadcrumb">
                    <li><a href="dashboard.html"><i class="icon-home"></i></a> <span class="divider">/</span></li>
                    <li class="active"><a href="#">Dashboard</a></li>
                </ul>
            </div>

            <div class="widgets_area">
              
                    <?php echo $content; ?>
               
            </div>
        </div>
    </div>
</div>


<footer>
    <span class="hidden-480">© Brought to you by Bernad Delicasd.</span>

</footer>
<?php $this->renderPartial('//layouts/includes/foot'); ?>
</body>
</html>